<?php

namespace app\company\model;

use app\common\model\BaseModel;

class MessageNotification extends BaseModel
{
    protected $table = 'vk_message_notifications';

    protected $deleteTime = false;

    public function type()
    {
        return $this->belongsTo(MessageNotificationType::class, 'type_id', 'id');
    }

    public function reads($isRead = null)
    {
        return $this->hasMany(MessageNotificationRead::class, 'message_notification_id', 'id');
    }
}
